﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace XRM.Security.DataAccess.Models
{
    [Table("InfoSystem")]
    public class InfoSystem
    {
        public InfoSystem()
        {
            Files = new List<InfoSystemFile>();
        }

        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int InfoSystemId { get; set; }

        [Required]
        [MaxLength(100)]
        public string InfoSystemName { get; set; }

        [MaxLength(100)]
        public string DomainGroup { get; set; }
        
        public bool InMaintenance { get; set; }
        
        [MaxLength(200)]
        public string Operator { get; set; }
        
        [MaxLength(500)]
        public string OperatorContact { get; set; }
        
        [MaxLength(200)]
        public string Developer { get; set; }
        
        [MaxLength(200)]
        public string Support { get; set; }
        
        public string Comment { get; set; }

        public DateTime DateIn { get; set; }
        public DateTime? DateOut { get; set; }

        public virtual ICollection<InfoSystemFile> Files { get; set; }
        public virtual ICollection<CertRegisterInfoSystem> CertRegisterInfoSystems { get; set; }
    } 
}